import request from '@/utils/request';
import { AxiosPromise } from 'axios';
// 根据当前用户获取模型
export const aiqaModelGet = (query?: any): AxiosPromise<any[]> => {
  return request({
    url: `/aiqa/model/get`,
    method: 'get',
    params: query
  });
};
// 敏感字过滤
export const aiqaSensitiveCheckSensitive = (query?: any): AxiosPromise<any[]> => {
  return request({
    url: `/aiqa/sensitive/check-sensitive`,
    method: 'post',
    data: query
  });
};

// 语境中心：分页查询列表

export const apiHelperGet = (query?: any): AxiosPromise<any[]> => {
	return request({
		url: '/aiqa/helper/get',
		method: 'get',
		params:query
	})
}
// 查询所有（基于用户）
export const apiHelperGetAll = (query?: any): AxiosPromise<any[]> => {
	return request({
		url: '/aiqa/helper/getAll',
		method: 'get',
		params:query
	})
}
// 创建
export const apiHelperAdd = (data) => {
	return request({
		url: '/aiqa/helper/add',
		method: 'post',
		data:data
	})
}
// 更新
export const apiHelperUpdate = (data) => {
	return request({
		url: '/aiqa/helper/update',
		method: 'put',
		data:data
	})
}
// 删除
export const apiHelperDel = (id) => {
	return request({
		url: `/aiqa/helper/del/${id}`,
		method: 'delete',
	})
}
// 给用户添加助手
export const apiHelperAddHelper = (data) => {
	return request({
		url: '/aiqa/helper/addHelper',
		method: 'post',
		data:data
	})
}
// 去除用户的助手
export const apiHelperDelHelper = (data) => {
	return request({
		url: '/aiqa/helper/delHelper',
		method: 'post',
		data:data
	})
}

// ppt 模板生成
export const apiChatStream = (data) => {
	return request({
		url: '/aiqa/chat/stream',
		method: 'post',
		data:data
	})
}
//点击语境中心(智能体)
export const apiWikiRecordGetAssistant = (query?: any): AxiosPromise<any[]> => {
	return request({
		url: '/aiqa/wiki/record/getAssistant',
		method: 'get',
		params:query
	})
}
// 客户端 查询提示词列表
export const aiqaPromptGet = (query?: any): AxiosPromise<any[]> => {
	return request({
		url: '/aiqa/prompt/get',
		method: 'get',
		params:query
	})
}

export default{
  aiqaModelGet,
  aiqaSensitiveCheckSensitive,
  apiHelperGet,
	apiHelperGetAll,
   apiHelperAdd,
   apiHelperUpdate,
   apiHelperDel,
	apiHelperAddHelper,
	apiHelperDelHelper,
	apiChatStream,
	apiWikiRecordGetAssistant,
	aiqaPromptGet
}